package com.springboot.common.entity;

/**
 * 响应状态枚举
 */
public enum ResponseStatus {
    /**
     * 内置状态
     */
    OK(0, "成功"),
    NORMAL_ERROR(-1, "失败"),

    SYSTEM_ERROR(500000, "系统错误"),
    BUSINESS_ERROR(500001, "业务错误"),

    NO_DATA_ERROR(500003, "没有找到数据"),
    PARAM_ERROR(500004, "参数格式错误"),
    LOGIN_INFO(50001, "请先登录"),
    LOGIN_TIME_OUT(50002, "登录过期，请重新登录"),
    LOGIN_ERROR(50003, "账号或密码错误"),
    AUTH_NOTHING(-3, "权限不足");
    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ResponseStatus(Integer status, String message) {
        this.code = status;
        this.message = message;
    }
}